#include <iostream>
using namespace std;
#include <iomanip>
using std::setw;
#include <cmath>

double add_all(double i);

int main()
{
	double i,sum_all;
	cin >> i;
	sum_all=add_all(i);
	cout << sum_all;
	return 0;
}

double add_all(double i)
{
	int a=i/100;
	int b=(i-a*100)/10;
	int c=(i-b*10-a*100);
	double sum_all=a+b+c;
	return sum_all;
}		
		
	
